<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th = "http://www.thymeleaf.org">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>部门列表</title>
  <!-- Bootstrap core CSS -->
  <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

  <!-- Custom styles for this template -->
  <link th:href="@{/css/dashboard.css}" rel="stylesheet">
  <style type="text/css">
    /* Chart.js */

    @-webkit-keyframes chartjs-render-animation {
      from {
        opacity: 0.99
      }
      to {
        opacity: 1
      }
    }

    @keyframes chartjs-render-animation {
      from {
        opacity: 0.99
      }
      to {
        opacity: 1
      }
    }

    .chartjs-render-monitor {
      -webkit-animation: chartjs-render-animation 0.001s;
      animation: chartjs-render-animation 0.001s;
    }
  </style>
</head>

<body>
<div th:replace="~{commons/commons::Topbar}"></div>

<div class="container-fluid">
  <div class="row">
    <!--侧边栏-->
    <div th:replace="~{commons/commons::Sidebar(active='departmentList.html')}"></div>

    <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
      <h2>部门列表</h2>
      <a class="position-relative; btn btn-sm btn-success" th:href="@{/toAddDep}">添加部门</a>
      <div class="table-responsive">
        <table class="table table-striped table-sm">
          <thead>
          <tr>
            <th>部门ID</th>
            <th>部门名称</th>
            <th>部门负责人</th>
            <th>部门创建时间</th>
            <th colspan="2">操作</th>
          </tr>
          </thead>
          <tbody>
          <tr th:each="dep:${departmentList}">
            <td th:text="${dep.getId()}"></td>
            <td th:text="${dep.getDepartmentName()}"></td>
            <td th:text="${dep.getChargeMan() == ''?'无':dep.getChargeMan()}"></td>
            <td th:text="${#dates.format(dep.getCreate_time(),'yyyy-MM-dd')}"></td>
            <td>
              <a class="btn btn-sm btn-primary" th:href="@{/dep/}+${dep.getId()}">编辑</a>
              <a class="btn btn-sm btn-danger" th:href="@{/deleteDep/}+${dep.getId()}">删除</a>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    </main>
  </div>
</div>

<div th:replace="~{commons/commons::pagehelper}"></div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="asserts/js/popper.min.js"></script>
<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>



</body>

</html>
